package br.com.unioeste.gui;

import java.awt.GridLayout;
import java.util.List;

import javax.swing.JPanel;
import javax.swing.JTabbedPane;

import br.com.unioeste.bo.Sala;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ListaSalas.java
 *
 * Created on 07/08/2011, 19:55:50
 */
/**
 *
 * @author diogo
 */
public class ListaSalas extends javax.swing.JPanel {

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	/** Creates new form ListaSalas */
    public ListaSalas() {
        //initComponents();
    }
    
    public ListaSalas(List<Sala> listaSalas){
    	
    	this.setLayout(new GridLayout());
    	
    	JTabbedPane jTabbed = new JTabbedPane();
    	
    	for(Sala sala : listaSalas){
    		JPanel panel = new ListaHorarioSala(sala.getSemestre());
    		jTabbed.add(sala.getNome()+" - max: "+sala.getCapacidade(), panel );
    	}
    	
    	this.add(jTabbed);
    	
    }

}
